package com.jiuyin.dianjing.ui.activity.community;


import android.view.View;
import android.widget.RadioGroup;

import com.jiuyin.dianjing.R;
import com.jiuyin.dianjing.ui.activity.base.BaseActivity;
import com.jiuyin.dianjing.util.ToastUtil;

import butterknife.BindView;
import butterknife.OnClick;


public class ReportActivity extends BaseActivity {

    @BindView(R.id.rg_report_type)
    RadioGroup rgReportType;

    private String reportType;

    @Override
    protected int setLayoutId() {
        return R.layout.activity_report;
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        setTitle(R.string.to_report);
        rgReportType.setOnCheckedChangeListener((group, checkedId) -> {
            switch (checkedId) {
                case R.id.rb_spam_messages:
                    reportType = getString(R.string.spam_messages);
                    break;
                case R.id.unfriendly_behavior:
                    reportType = getString(R.string.unfriendly_behavior);
                    break;
                case R.id.rb_harmful_information:
                    reportType = getString(R.string.harmful_information);
                    break;
                case R.id.rb_alleged_infringement:
                    reportType = getString(R.string.alleged_infringement);
                    break;
                case R.id.rb_false_information:
                    reportType = getString(R.string.false_information);
                    break;
                case R.id.rb_report_other:
                    reportType = getString(R.string.report_other);
                    break;
                default:
                    break;
            }
        });
    }

    @OnClick({R.id.bt_report})
    public void onViewClicked(View view) {
        if (view.getId() == R.id.bt_report) {
            ToastUtil.showShort(reportType);
        }
    }
}
